﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Benefit.Models.Sys;

namespace Benefit.Interface.Sys
{
    public interface IOperator
    {
        /// <summary>
        /// 得到所有操作员
        /// </summary>
        /// <returns></returns>
        List<Operator> GetList();
        /// <summary>
        /// 得到所有没有没删除的操作员
        /// </summary>
        /// <returns></returns>
        List<Operator> GetUnDeletedOperators();
        /// <summary>
        /// 增加一个交易员
        /// </summary>
        /// <returns>交易员编号</returns>
        int AddOperator(string email, string password, string phone, string sex, string uname, string username);

        Operator GetModel(int id);
        /// <summary>
        /// 获取成长指数
        /// </summary>
        /// <param name="lastMonthProfit"></param>
        /// <param name="MonthProfit"></param>
        /// <returns></returns>
        int GetGrowthIndex(double lastMonthProfit, double MonthProfit);
        /// <summary>
        /// 获取稳定指数
        /// </summary>
        /// <param name="lastMonthProfit"></param>
        /// <param name="MonthProfit"></param>
        /// <returns></returns>
        int GetStableIndex(double lastMonthProfit, double MonthProfit);
        /// <summary>
        /// 获取指数的图片的数量
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        int GetPicCount(int index);
        /// <summary>
        /// 操作员登录
        /// </summary>
        /// <param name="username"></param>
        /// <param name="password"></param>
        /// <param name="tradeHistoryId"></param>
        /// <param name="pdate"></param>
        /// <returns></returns>
        int OperatorLogin(string username, string password, int tradeHistoryId, string pdate);

        /// <summary>
        /// 得到同一个批次的所有交易员
        /// </summary>
        /// <param name="batch"></param>
        /// <returns></returns>
        List<Operator> GetBatchOperators(int batch);

        /// <summary>
        /// 判断交易员当日是否有做交易
        /// </summary>
        /// <param name="operatorid"></param>
        /// <param name="tradeHistoryId"></param>
        /// <returns></returns>
        bool OperatorTradedAtDay(int operatorid, int tradeHistoryId);

        /// <summary>
        /// 判断交易员当日是否有做交易
        /// </summary>
        /// <param name="operatorid"></param>
        /// <param name="tradeHistoryId"></param>
        /// <returns></returns>
        bool OperatorTradedAtMonth(int operatorid, int month, int year);

    }
}